'use strict';

function Login() {
    var phone = $('#numPhone').val();
    var password = $('#password').val();
    console.log(phone);
    console.log(password);
    // 发送登录请求
    $.get('http://localhost:5009/api/UserInfo/Login?', { phone: phone, pwd: password }, function (response) {
        // console.log(response);
        if (response.code == 200) {
            // 登录成功，执行相应的操作
            console.log('登录成功');
            location.href = './index.html'
        } else {
            // 登录失败，显示错误信息
            console.log('登录失败: ' + response.message);
        }
    });
}